<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>查看考试人</title>
<script type="text/javascript" src="static/easyui/jquery.min.js"></script>
<script type="text/javascript" src="static/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="static/easyui/locale/easyui-lang-zh_CN.js"></script>
<link rel="stylesheet" href="static/easyui/themes/icon.css">
<link rel="stylesheet" href="static/easyui/themes/metro-red/easyui.css">
</head>
<body>
<style type="text/css">
.personone{
	width: 1000px;
    height: 40px;
    font-size: 16px;
    color: #19AA8D;
    display: block;
    margin: auto;
    background-color: #F2F2F2;
    text-align: center;
    line-height: 40px;
}
.persontwo{
	width:1000px;
	height:130px;
	margin:10px auto;
	display: block;
}
.interview-testleft{
	width: 440px;
    height: 140px;
    float: left;
    display: block;
    margin-left: 40px;
}
.interview-testright{
	width: 405px;
    height: 140px;
    float: right;
    display: block;
    margin-right:-50px;
}
.interview-testleft ul li,.interview-testright ul li{
	margin-top:10px;
}
.personthree{
	width:900px;
	height: 270px;
	margin:20px auto;
	display: block;
}
.spr{
		width:100px;
		height:25px;
		font-size:12px;
		color: #1AB394;
    	font-weight: 700;
    	font-size:14px;
    	margin-left:30px;
}
.personfour{
	width:100px;
	height:30px;
	margin:30px auto;
}
.renwuno{
	width:60px;
	height:25px;
	color:white; 
	border:none;
	float:left;
	cursor:pointer;
}
.renwuok{
	width:60px;
	height:25px;
	color:white;
	border:none;
	float:right;
	cursor:pointer;
}
.icon-renwu-quxiao{
		padding-left: 20px;
		background:url('static/easyui/themes/icons/fanhui.png') no-repeat 5% 50%;
		background-color:#EC971F;
}
.icon-renwu-queding{
		padding-left: 20px;
		background:url('static/easyui/themes/icons/baocun.png') no-repeat 5% 50%;
		background-color:#13826B;
}
.xzks{
		width:80px;
		height:80px;
		border:none;
		cursor: pointer;
}
.icon-insert-xinzeng{
		padding-left: 20px;
		background:url('static/easyui/themes/icons/tianjia.png') no-repeat 5% 50%;
		background-color:none;
}
	.btn-close{
		color: #666;
    	background-color: #fff;
    	border-color: #e5e6e7!important;
	}
	.btn-yes{
		color: #fff!important;
    	background-color: #19AA8D!important;
    	border-color: #19AA8D!important;
	}
	.close{
		padding: 0px;
	    opacity: 1;
	    transition: all linear .2s;
	    margin-top: -2px;
	    border: 0;
	    float: right;
	    font-size: 21px;
	    font-weight: 700;
	    line-height: 1;
	    color: #000;
	    cursor:pointer;
	    text-shadow: 0 1px 0 #fff;
	}
#xzstudents{
	float:right;
	margin-top:40px;
}
.xuan{
	width:170px;
	height:25px;
	border:1px solid #CCCCCC;
	border-radius: 4px;
	margin-left:30px;
}
	#sname{
		color:black;
		width:60px;
		height:22px;
		text-align:center;
		line-height:22px;
	}
	#ks{
	    overflow-x: auto;
	    margin-top: 5px;
	    border-collapse: collapse;
	    border: 1px solid #e4e7ec;
	    background-color: #fff;
   		color: gray;
   		font-size:12px; 
   		margin-left:25px;
	}
	#ks thead{
		color: #19AA8D;
	    font-size: 14px;
	    font-weight: 700;
	} 
	#ks th{
		background: #6666661a;
	}
	#ks td{
		border: 1px solid #e4e7ec;
		width: 150px;
		height: 50px;
	}
.datagrid-header-row td{
		background: #E6E6E6;
		color: #19AA9C;
	    font-size: 14px;
	    font-weight: 700;
	    text-align: center;
	}
	.datagrid-row td{
		background: #fff;
		font-size: 12px;
		text-align: center;
	}
</style>
<script type="text/javascript">
$(function(){
	//点击返回按钮
	$("#rwfh").click(function(){
		add("testconpany");
	});
	//确定按钮
	$("#rwqd").click(function(){
		//id
		var ttestid = $("#ttestid").val();
		 $.ajax({
				url:"personcsh",
				type:"get",
				dateType:"json",
				data:{ttestid:ttestid},
				success: function (result) {
				
				}
		 });
		 	var ttestid = $("#ttestid").val();
			$.ajax({
			url:"look-student",
			type:"post",
			data:{
				"ttestid":ttestid
			},
		success:function(result){	
				
			}
		})			
		$("#interviewinsert").window("close");	
		$("#content-admin").panel('open').panel('refresh','recruitinterview');
	})
});
$('#ks').datagrid({
	url:'',
	singleSelect:true,
	columns:[[
		{field:'id',title:'编号',width:100,align:'center'},
		{field:'name',title:'名称',width:280,align:'center'},
		{field:'sex',title:'性别',width:150,align:'center'},
		{field:'phone',title:'手机号',width:160,align:'center'},
		{field:'year',title:'工龄',width:154,align:'center'},
	]]
});
//考试试卷名称
$('#ttestname').combogrid({
    panelWidth:200,
    url:'select_shijuans',
    singleSelect:true,
    idField:'ttestname',
    treeField:'ttestname',
    columns:[[
    	{field:'sortable',title:'#',width:35,align:'center'},
    	{field:'ttestid',hidden:true},
        {field:'ttestname',title:'试卷名称',width:160,align:'center'},
    	 {field:'ttesttnums',title:'时长',width:160,align:'center',hidden:true,},
    	 {field:'ttestavrage',title:'总分',width:160,align:'center',hidden:true,},
    	 {field:'ttesttheme',title:'主题',width:160,align:'center',hidden:true,},
    	 {field:'ttestledge',title:'知识组',width:160,align:'center',hidden:true,},
    	 {field:'rname',title:'创建者',width:160,align:'center',hidden:true,},
    	 {field:'ttestdate',title:'创建日期',width:160,align:'center',hidden:true,},
    	 {field:'sname',title:'考生',width:160,align:'center',hidden:true,},
    ]],
    onClickRow:function(rowIndex, rowData){
		$("#ttestid").val(rowData['ttestid']);
		$("#ttesttnums").val(rowData['ttesttnums']);
		$("#ttestavrage").val(rowData['ttestavrage']);
		$("#ttesttheme").val(rowData['ttesttheme']);
		$("#ttestledge").val(rowData['ttestledge']);
		$("#rname").val(rowData['rname']);
		$("#ttestdate").val(rowData['ttestdate']);
		$.ajax({
			url:"ttest-selectsatff",
			type:"post",
			data:{
				"ttestid":rowData['ttestid']
			},
			success:function(result){	
				$.each(result,function(index,item){
					console.log(result[index].staff_id+"----");
					$('#ks').datagrid('appendRow',{
						id: result[index].staff_id,
						name: result[index].Staff_name,
						sex: result[index].Staff_sex,
						year: result[index].staff_years,
						phone: result[index].Staff_phone
					});
				});
			}
		});
    }
});
</script>
<div class="insert-person" style="height:600px;display:block;">
	<div class="personone"><span>查询试卷信息</span></div>
	<div class="persontwo">
	<input type="hidden" id="ttestid">
	<input type="hidden" id="Staff_id">
	<input type="hidden" id="activity_id">
			<div class="interview-testleft">
			   <ul style="list-style:none;width: 260px;height: 150px;margin-left:40px;">
			   		<li><span>名称：</span><input id="ttestname" type="text" style="color:#777777;width:200px;"></li>
			   		<li><span>时长：</span><input id="ttesttnums" type="text" style="color:#777777;width:200px;"></li>
			   		<li><span>总分：</span><input id="ttestavrage" type="text" style="color:#777777;width:200px;"></li>
			   		<li><span>主题：</span><input id="ttesttheme" type="text" style="color:#777777;width:200px;"></li>
			   </ul>
			</div>
			<div class="interview-testright">
				  <ul style="list-style:none;width:280px;height:150px;">
				  	<li><span style="margin-left: -13px;">知识组：</span><input id="ttestledge" type="text" style="color:#777777;width:200px;"></li>
			   		<li><span style="margin-left: -13px;">创建者：</span><input type="text" id="rname" style="width:203px;"></li>
			   		<li><span style="margin-left: -25px;">创建日期：</span><input type="text" id="ttestdate" style="width:203px;"></li>
			   </ul>
			</div>
	</div>
			<div class="personthree">			
			  <div class="spr">考生</div>
					<table class="easyui-datagrid" id="ks" data-options="width:845,height:240">
					</table>
			</div>
	<div class="personfour">
		<button id="rwfh" class="renwuno icon-renwu-quxiao">返回</button>
	</div>
</div>
</body>
</html>